package com.kfp.dubbo.consumer;

import org.apache.dubbo.config.annotation.DubboReference;
import org.example.IAnimal;
import org.springframework.stereotype.Service;

@Service
public class AnimalServer {

    @DubboReference(check = false,cluster = "failover", retries = 2, timeout = 100)
    private IAnimal animal;

    @DubboReference(group = "dog", mock = "com.kfp.dubbo.consumer.MyAnimalMock")
    private IAnimal animalDog;

    public String run() {
        return animal.move();
    }

    public String dogRun() {
        return animalDog.move();
    }
}
